package cn.zwx.member.svc.service.impl;

import cn.zwx.common.mybatis.query.LambdaQueryWrapperX;
import cn.zwx.member.svc.domain.entity.MemberUserEntity;
import cn.zwx.member.svc.mapper.MemberUserMapper;
import cn.zwx.member.svc.service.MemberUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author zhangwenxue
 */
@Service
public class MemberUserServiceImpl implements MemberUserService {

    @Resource
    private MemberUserMapper mapper;
    @Override
    public Long getUserCountByGroupId(Long id) {
        return mapper.selectCount(new LambdaQueryWrapperX<MemberUserEntity>()
                .eq(MemberUserEntity::getGroupId, id));
    }
}
